home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / Esmart / Esmart_Container.h next >
C/C++ Source or Header  |  2006-01-09  |  4KB  |  118 lines

  1. #ifndef ESMART_CONTAINER_H
  2. #define ESMART_CONTAINER_H
  3.  
  4. #include <Evas.h>
  5.  
  6. /*****
  7.  Todo:
  8.  
  9.    o add a "mover" object that tracks where moving element will go
  10.  
  11. ****/
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15.  
  16. enum _Container_Direction
  17. {
  18.   CONTAINER_DIRECTION_HORIZONTAL,  
  19.   CONTAINER_DIRECTION_VERTICAL
  20. };
  21. typedef enum _Container_Direction Container_Direction;
  22.  
  23. enum _Container_Alignment
  24. {
  25.   CONTAINER_ALIGN_CENTER = 0,
  26.   CONTAINER_ALIGN_LEFT = 0x01,
  27.   CONTAINER_ALIGN_RIGHT = 0x02,
  28.   CONTAINER_ALIGN_BOTTOM = 0x04,
  29.   CONTAINER_ALIGN_TOP = 0x08
  30. };
  31. typedef enum _Container_Alignment Container_Alignment;
  32.  
  33. enum _Container_Fill_Policy
  34. {
  35.   CONTAINER_FILL_POLICY_NONE = 0,
  36.   CONTAINER_FILL_POLICY_KEEP_ASPECT = 0x01,
  37.   CONTAINER_FILL_POLICY_FILL_X = 0x02,
  38.   CONTAINER_FILL_POLICY_FILL_Y = 0x04,
  39.   CONTAINER_FILL_POLICY_FILL = 0x08, 
  40.   CONTAINER_FILL_POLICY_HOMOGENOUS = 0x10
  41. };
  42. typedef enum _Container_Fill_Policy Container_Fill_Policy;
  43.  
  44. Evas_Object *esmart_container_new(Evas *evas);
  45.  
  46. void esmart_container_direction_set(Evas_Object *container, Container_Direction direction);
  47. Container_Direction esmart_container_direction_get(Evas_Object *container);
  48.  
  49.  
  50. void esmart_container_padding_set(Evas_Object *container, double l, double r,
  51.                              double t, double b);
  52. void esmart_container_padding_get(Evas_Object *container, double *l, double *r,
  53.                              double *t, double *b);
  54.  
  55.  
  56. void esmart_container_fill_policy_set(Evas_Object *container,
  57.                                  Container_Fill_Policy fill);
  58. Container_Fill_Policy  esmart_container_fill_policy_get(Evas_Object *container);
  59.  
  60.  
  61. void esmart_container_alignment_set(Evas_Object *container,
  62.                                Container_Alignment align);
  63. Container_Alignment esmart_container_alignment_get(Evas_Object *container);
  64.  
  65.  
  66. void esmart_container_spacing_set(Evas_Object *container,
  67.                                 int spacing);
  68. int  esmart_container_spacing_get(Evas_Object *container);
  69.  
  70.  
  71. void esmart_container_move_button_set(Evas_Object *container, int move_button);
  72. int  esmart_container_move_button_get(Evas_Object *container);
  73.  
  74.  
  75. /* element adding/removing */
  76. void esmart_container_element_append(Evas_Object *container, Evas_Object *element);
  77. void esmart_container_element_prepend(Evas_Object *container, Evas_Object *element);
  78. void esmart_container_element_append_relative(Evas_Object *container,
  79.                                          Evas_Object *element,
  80.                                          Evas_Object *relative);
  81. void esmart_container_element_prepend_relative(Evas_Object *container,
  82.                                           Evas_Object *element,
  83.                                           Evas_Object *relative);
  84. void esmart_container_element_remove(Evas_Object *container, Evas_Object *element);
  85. void esmart_container_element_destroy(Evas_Object *container, Evas_Object *element);
  86. void esmart_container_empty (Evas_Object *container);
  87. void esmart_container_sort(Evas_Object *container, int (*func)(Evas_Object *, Evas_Object *));
  88.  
  89. Evas_List *esmart_container_elements_get(Evas_Object *container);
  90.  
  91. /* scrolling */
  92. void esmart_container_scroll_start(Evas_Object *container, double velocity);
  93. void esmart_container_scroll_stop(Evas_Object *container);
  94. void esmart_container_scroll(Evas_Object *container, int val);
  95.  
  96. void   esmart_container_scroll_offset_set(Evas_Object *container, int val);
  97. int    esmart_container_scroll_offset_get(Evas_Object *container);
  98. void   esmart_container_scroll_percent_set(Evas_Object *container, double percent);
  99. double esmart_container_scroll_percent_get(Evas_Object *container);
  100. void   esmart_container_scroll_to(Evas_Object *container, Evas_Object *element);
  101.  
  102. /* callbacks */
  103. void esmart_container_callback_order_change_set(Evas_Object *obj, 
  104.                                            void (*func)(void *data),
  105.                                            void *data);
  106.  
  107. double esmart_container_elements_length_get(Evas_Object *container);
  108. double esmart_container_elements_orig_length_get(Evas_Object *container);
  109.  
  110. int esmart_container_layout_plugin_set(Evas_Object *container, const char *name);
  111.  
  112.  
  113. #ifdef __cplusplus
  114. }
  115. #endif
  116.  
  117. #endif
  118.